﻿using System;

namespace BSharp.Compiler.Emit
{
	public class Mod : IntermediateInstruction
	{
		public int Register1;
		public int Register2;

		public Mod (int reg1, int reg2)
		{
			Register1 = reg1;
			Register2 = reg2;
		}

		public override void Visit (IntermediateCompiler compiler)
		{
			compiler.Compile (this);
		}

		public override string ToString ()
		{
			return String.Format ("MOD r{0}, r{1}", Register1, Register2);
		}
	}
}

